﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using IFSModel;

public partial class FBApp_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            var fbSource = HttpContext.Current.Request.Params["fb_source"];
            var requestIDs = HttpContext.Current.Request.Params["request_ids"];
            if (!string.IsNullOrEmpty(fbSource) && !string.IsNullOrEmpty(requestIDs))
            {
                string[] requstids = requestIDs.Split(',');
                var fis = requstids.Select(requstid => new friendsInvite {requestId = Convert.ToInt64(requstid)}).ToList();
                IFSController.Helper.Result result;
                IFSController.member.UpdateFriendInvite(fis, out result);

            }
        }
    }
}